﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BankService.CallbackInterface;

namespace BankService {

    class Client {

        private static int nextAccountNumber = 0;
        
        private string currentSessionId;
        private IBankCallback callback;
        private string username;
        private string address;
        private string password;
        private int accountNumber;
        private double balance;
        private List<string> messages;

        public Client(string username, string address, string password) {
            this.currentSessionId = null;
            this.callback = null;
            this.username = username;
            this.address = address;
            this.password = password;
            this.accountNumber = nextAccountNumber++;
            this.balance = 100.0;
            this.messages = new List<string>();
        }

        public string CurrentSessionId {
            get { return this.currentSessionId; }
            set { this.currentSessionId = value; }
        }

        public IBankCallback Callback {
            get { return this.callback; }
            set { this.callback = value; }
        }

        public string Username {
            get { return this.username; }
            set { this.username = value; }
        }

        public string Address {
            get { return this.address; }
            set { this.address = value; }
        }

        public string Password {
            get { return this.password; }
            set { this.password = value; }
        }

        public int AccountNumber {
            get { return this.accountNumber; }
            set { this.accountNumber = value; }
        }

        public double Balance {
            get { return this.balance; }
            set { this.balance = value; }
        }

        public List<string> Messages {
            get { return this.messages; }
            set { this.messages = value; }
        }
    }
}
